package game;


/**
 * 子弹类
 *
 * @author zl
 */
public class Bullet
        extends FlyObeject {
    int dir;

    public Bullet(int hx, int hy, int dir) {
        img = GetPicture.getImg("/picture/bullet_01.png");
        w = img.getWidth() / 2;
        h = img.getHeight() / 2;
        x = hx;
        y = hy;
        this.dir=dir;
    }

    public void move() {
        if (dir==0){
            x-=1;
            y-=10;
        }else if (dir==1){
            y -=10;
        }else{
            x+=1;
            y-=10;
        }
    }
}
